<?php
/*
 * 登录model
*/
namespace app\login\model;
use think\Cache;
use \think\Model;
use \think\db;


class Login extends Model
{
  protected static $tb = [
    'activity'    => 'activity',

  ];


    /**
     * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     * 小程序
     * */
    public function getcode($data=[]){
        $res = model("api/Mini")->getSessionKey($data);
        return $res;
    }

    /***
     * 小程序登陆获取用户授权信息
     * @param int $web_id
     * @return bool
     */
    public function getuserinfo($data=[]){
  	$res = model("api/Mini")->getuserinfo($data);
  	if(!empty($res['errcode'])){
  		return "-".$res['errcode'];
  	}else{
  		return $res;
  	}
  }



  /**
   * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   * 公众号
   * */

}
